﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WFNetLib.GSMModem;

namespace MMCode
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            byte[] outputb = Convert.FromBase64String(textBox5.Text);
            string orgStr = Encoding.Default.GetString(outputb);
            string time = orgStr.Substring(0, "07142011212804".Length);
            string pwd;
            if(textBox7.Text=="")
                pwd= orgStr.Substring("07142011212804".Length);
            else
                pwd = textBox7.Text;
            textBox6.Text = GsmModem.MMCode(textBox2.Text, textBox1.Text, time, textBox3.Text, textBox4.Text, pwd);
//             textBox6.Text = GsmModem.MMCode("18724380684",
//                                             "9269F6CFD6761342C5D3378BEE404B75BB8248C40DF5BEACDD3BCD6185602D2D2228ADEF23E0485C", 
//                                             "05282012113333", 
//                                             "100003205215837100001089435300001763546", 
//                                             "1", 
//                                             "526457");
        }
    }
}
